<div id="torrentsTableFixedHeaderDiv" class="dynamicTableFixedHeaderDiv">
    <table class="dynamicTable unselectable" style="position:relative;">
        <thead>
            <tr class="dynamicTableHeader"></tr>
        </thead>
    </table>
</div>

<div id="torrentsTableDiv" class="dynamicTableDiv">
    <table class="dynamicTable unselectable">
        <thead>
            <tr class="dynamicTableHeader"></tr>
        </thead>
        <tbody></tbody>
    </table>
</div>

<script type="text/javascript">

    //create a context menu
    var torrentsTableContextMenu = new TorrentsTableContextMenu({
        targets : '.torrentsTableContextMenuTarget',
        menu : 'torrentsTableMenu',
        actions : {
            Delete : function (element, ref) {
                deleteFN();
            },
            Start : function (element, ref) {
                startFN();
            },
            Pause : function (element, ref) {
                pauseFN();
            },
            ForceStart : function (element, ref) {
                setForceStartFN();
            },
            prioTop : function (element, ref) {
                setPriorityFN('topPrio');
            },
            prioUp : function (element, ref) {
                setPriorityFN('increasePrio');
            },
            prioDown : function (element, ref) {
                setPriorityFN('decreasePrio');
            },
            prioBottom : function (element, ref) {
                setPriorityFN('bottomPrio');
            },
            ForceRecheck : function (element, ref) {
                recheckFN();
            },
            UploadLimit : function (element, ref) {
                uploadLimitFN();
            },
            DownloadLimit : function (element, ref) {
                downloadLimitFN();
            },
            SequentialDownload : function (element, ref) {
                toggleSequentialDownloadFN();
            },
            FirstLastPiecePrio : function (element, ref) {
                toggleFirstLastPiecePrioFN();
            },
            SuperSeeding : function (element, ref) {
                setSuperSeedingFN(!ref.getItemChecked('SuperSeeding'));
            }
        },
        offsets : {
            x : -15,
            y : 2
        }
    });

    torrentsTable.setup('torrentsTableDiv', 'torrentsTableFixedHeaderDiv', torrentsTableContextMenu);
</script>
